FlatImageStorage

Represents an image using a flat array.

Because the usage of multiplication is required to index and assign, it is not recommend to be used outside of drawing contexts. Where this is the least expensive option for a buffer to draw upon.

Will automatically deallocate its memory when it goes out of scope. Should not be copied or moved around.

Constructors

this
this(size_t width, size_t height, IAllocator allocator)

Destructor

~this
~this()
Undocumented in source.

Members

Functions

__pixelsRawArray
immutable(Color[]) __pixelsRawArray()

Get the array that backs this image storage type

getPixel
Color getPixel(size_t x, size_t y)
opIndex
Color opIndex(size_t x, size_t y)
opIndexAssign
void opIndexAssign(Color value, size_t x, size_t y)
resize
bool resize(size_t newWidth, size_t newHeight)
setPixel
void setPixel(size_t x, size_t y, Color value)

Properties

height
size_t height [@property getter]
width
size_t width [@property getter]

See Also

ImageStorage

Meta